Repository navigation
Conversation
…off) On the Wayland path the swapchain has at least 3 images. When the compositor holds all of them (a buffer comes back about three refreshes after its commit) the game waits for a release before it can draw the next frame, which on a 120 Hz screen shows as frames missing their slot. VKBRIDGE_SWAPCHAIN_IMAGES=<n> (1-8) raises the minimum to n; unset or 0 keeps the application's count (at least 3). The chosen count is logged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The image count is fixed at 3. On the Poco Steam menu, with 3 images and about 24 ms from commit to release, most slow frames waited for a free image.
Change
VKBRIDGE_SWAPCHAIN_IMAGES=1..8, default off (behaviour unchanged), with an info log line of the chosen count.
How tested
Host quick-check 14/14 (RADV). Device runs on both phones (menu; Poco also Megabonk).
Evidence
What is shown (Steam menu, n=1-2, 30 s):
What is not shown: Megabonk on the Poco, 6 vs 8 images (4 runs, n=1-2 per arm, a different scene each time): 6 images 73.3 fps with 8.9 no-free-image waits/s and 86.3 fps with 0.0/s; 8 images 68.9 fps with 0.0/s and 99.0 fps with 4.5/s. The wait counts do not follow the image count (the same 6-image setting gave 8.9/s and 0.0/s) and fps follows the scene. So there is no evidence that 8 beats 6 in game, and none that it is worse. Some of these runs were USB-powered: no power numbers. On CMF Phone 1 in game (GPU-bound, about 20 fps) the toggles made no measurable difference. Not measured: 4 or 5 images in game, 3 vs 6 in game on the Poco.
Devices: Poco X8 Pro Max (2602BPC18G, Immortalis-G925) and CMF Phone 1 (A015, Mali-G615 MC2, MT6878, 120 Hz). Test app: MaliDeck (a re-signed DroidDeck 0.7.1 test build). Wireless adb. No power numbers are claimed: some runs were USB- or AC-powered.
CMF Phone 1, one default turned off at a time (n=1, 30 s each; none off is about 76): ANGLE=vulkan off 37.1, 6 images off 56.6, pass-through off 66.0, early present off 68.6, present reap off 71.2, async create off 74.0.
Poco, cumulative steps: 75 -> 84 (web UI on ANGLE Vulkan) -> 90 (async create) -> 102 (pass-through) -> 118 (early present + 6 images) -> 118.5 (present reap). Frames on the 8.3 ms slot: 71-76 % -> 98.8 %.
Megabonk in game, Poco, 75 s after a 30 s warm-up, p7 vs stock: 83.3 vs 77.9 fps and 110.9 vs 92.3 fps (n=2 per arm, different scenes). A gain of about 5-10 fps is plausible, not proven. CMF Phone 1, Megabonk, p8 defaults vs stock (stock 21.6 and 22.0; p8 20.9, 17.6, and 24.5 with tracing on): no measurable difference, scene noise about 3 fps; the game is GPU-bound there (GPU done 23 ms after commit against a 40 ms present interval), so these toggles are not shown to help a GPU-bound game. No power numbers on CMF Phone 1.
Limitations: attribution rows are single 30 s samples. In-game A/B has scene noise (n=2 per arm). On CMF Phone 1 an "Offline Mode" popup was on screen in all menu runs, so absolute fps may differ from a clean menu. A forced-composite vs pass-through flicker comparison was run only in CMF Phone 1 Megabonk (6 screenshots each, no flicker or tearing seen either way, fps equal within noise); not on the Poco. In the Poco game flicker check, 78 of about 79 composite_why lines were layers=1 / composite=0, one was layers=2, and one frame was black at the Guide-button transition. On CMF Phone 1 the menu was GPU-limited (GPU at max clock 36-97 % of the time) and showed no flicker with pass-through. Quick 30 s menu runs are screening only, not benchmarks. In game the Poco is limited by game CPU and GPU together; the 11 stalls over 50 ms came from game loading/GC, not the bridge.
How to reproduce
Set the toggle named in this text (others at their defaults), open the Steam menu, move the pointer for 30 s, and read frame intervals from the compositor/gamescope frame log (intervals under 100 ms count as in motion). Raw runs and scripts are available on request.
Risks
More images mean more memory and a longer latency queue.
Toggles / defaults
Default off. The DroidDeck session-defaults PR sets 6 when its opt-in is on. I would not go above 6: 8 is accepted (max 8) but not shown to be better, and 4 already gave most of the menu gain. The suggested range is yours to change.
Dropped
Nothing.
[Disclosure: I prepared this change and text with the help of an AI assistant. The measurements come from real device runs; the limits are stated above.]